package com.mrtrying.ui.example;

import android.annotation.SuppressLint;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.mrtrying.widget.LabelsFlowLayout;

import java.util.ArrayList;
import java.util.List;

public class LabelLayoutActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_label_layout);
        // TODO: 2019/3/6
//        LabelsFlowLayout labelsFlowLayout = findViewById(R.id.labels_layout);
//        List<String> data = new ArrayList<>();
//        for(int i=0;i<20;i++){
//            String text = "";
//            for(int j =0;j<i;j++){
//                text += "*";
//            }
//            data.add(text);
//        }
//        labelsFlowLayout.setAdapter(new LabelsFlowLayout.LabelAdapter<String>(data) {
//            @Override
//            public View getView(int position, View convertView, ViewGroup parent) {
//                @SuppressLint("ViewHolder")
//                View view = LayoutInflater.from(LabelLayoutActivity.this).inflate(R.layout.item_label,parent,false);
//                TextView textView = view.findViewById(R.id.text);
//                textView.setText(getItem(position));
//                return view;
//            }
//        });
    }
}
